<template>
    <!-- 登录扫码 -->
    <div class="container">
        <div>{{ url }}</div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            url: '已扫码，请稍等...',
            code: null,
            state: null
        }
    },
    beforeMount() {
        this.code = this.$route.query.code
        this.state = this.$route.query.state
        window.parent.postMessage({
            code: this.$route.query.code,
            state: this.$route.query.state
        }, '*');
    },
    mounted() {
        // console.log('加载完成');
    }
}
</script>

<style lang="scss" scoped>
.container {
    // width: 150px;
    // height: 150px;
    transform: translateY(-50px);
    // border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    font-weight: 700;
    color: #666;
}
</style>

